home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Magazin: Amiga-CD 1997 November & December
/
Amiga-CD 1997 #11-12.iso
/
online
/
inetutils-1.4
/
contrib
/
active2next.rexx
next >
Wrap
OS/2 REXX Batch file
|
1994-09-30
|
814b
|
34 lines
/*
* A quad hack to read an active file, and update the uunews: tree
* with .next files that match it.
*
* Thanks to Mike Meyer (mwm@contessa.phone.net)
*/
parse arg activefile
/* Verify we've got something to work with */
if activefile = "" then do
say "usage: active2next <activefile>"
exit 10
end
/* Go fetch stuff via nntp */
address command 'nntpxfer' '$NNTPSERVER' activefile 'paranoid'
/* Get the file to process */
if ~open(active, activefile, 'Read') then do
say "No active file!? Fix this, and try again!"
exit 10
end
/* Now do it, one line at a time */
do while ~eof(active)
parse value readln(active) with group hi . .
if hi = "" then iterate
group = translate(group, "/", ".")
dir = 'uunews:'group
if ~exists(dir) then iterate
address command 'echo' (hi + 1) '>'dir'/.next'
end